<?php 
defined('RUN_KATANA') or die('Restricted access');
echo $commander->getListCommandsPanel('sa', ''); 
if(is_object($adc->getCurrentAd())):
$adc->setView('detail');
?>
<fieldset class="edit_form">
	<label for="Title"><?php echo ucfirst($txt->getWord('title')); ?></label>
    <?php echo $commander->getErrorField('Title'); ?>
    <?php echo $commander->getInfoField('Title'); ?>
    <input name="Title" class="medium" type="text" value="<?php echo $adc->CurrentAd->getTitle(); ?>" maxlength="80" /><br />
	
	<label for="TitleEn"><?php echo ucfirst($txt->getWord('title')); ?> (EN)</label>
    <?php echo $commander->getErrorField('Title'); ?>
    <?php echo $commander->getInfoField('Title'); ?>
    <input name="TitleEn" class="medium" type="text" value="<?php echo $adc->CurrentAd->getTitleEn(); ?>" maxlength="80" />
	
	<label for="TypeId"><?php echo ucfirst($txt->getWord('ad_type')); ?></label>
    <?php echo $commander->getErrorField('TypeId'); ?>
    <?php echo $commander->getInfoField('TypeId'); ?>
    <select class="medium" name="TypeId" onchange="submit();">
        <option value="0" <?php echo getIsSelectedHTML($adc->CurrentAd->getTypeId(), 0); ?>><?php echo ucfirst($txt->getWord('undefined')); ?></option>
        <?php 
        if($adc->getAdTypes())
        {
            foreach($adc->getAdTypes() as $type)
            { echo '<option value="'.$type->getId().'" '.getIsSelectedHTML($adc->CurrentAd->getTypeId(), $type->getId()).'>'.$type->getTitle().'</option>'; }
        }
        ?>
    </select>
	
	<label for="CatId"><?php echo ucfirst($txt->getWord('ad_category')); ?></label>
    <?php echo $commander->getErrorField('CatId'); ?>
    <?php echo $commander->getInfoField('CatId'); ?>
    <select class="medium" name="CatId" onchange="submit();">
        <option value="0" <?php echo getIsSelectedHTML($adc->CurrentAd->getCatId(), 0); ?>><?php echo ucfirst($txt->getWord('none')); ?></option>
        <?php 
        if($adc->getAdCats())
		{
			foreach($adc->getAdCats() as $adcat)
			{ echo '<option value="'.$adcat->getId().'" '.$txt->getIsSelectedHTML($adc->CurrentAd->getCatId(), $adcat->getId()) .'>'.$adcat->getTitle().'</option>'; }
		}
        ?>
    </select>
	
    <label for="BrandId"><?php echo ucfirst($txt->getWord('brand')); ?></label>
    <?php echo $commander->getErrorField('BrandId'); ?>
    <?php echo $commander->getInfoField('BrandId'); ?>
    <select class="medium" name="BrandId" onchange="submit();">
        <option value="0" <?php echo getIsSelectedHTML($adc->CurrentAd->getCountry(), 0); ?>><?php echo ucfirst($txt->getWord('none')); ?></option>
        <?php 
        if($adc->getAdBrands())
        {
            foreach($adc->getAdBrands() as $brand)
            { echo '<option value="'.$brand->getId().'" '.getIsSelectedHTML($adc->CurrentAd->getBrandId(), $brand->getId()).'>'.$brand->getTitle().'</option>'; }
        }
        ?>
    </select>
	
	<label for="Description"><?php echo ucfirst($txt->getWord('description')); ?></label>
    <?php echo $commander->getErrorField('Description'); ?>
    <?php echo $commander->getInfoField('Description'); ?>
    <textarea name="Description" class="medium limit_500 autogrow"><?php echo $adc->CurrentAd->getDescription(); ?></textarea>
	
	<label for="DescriptionEn"><?php echo ucfirst($txt->getWord('description')); ?> (EN)</label>
    <?php echo $commander->getErrorField('DescriptionEn'); ?>
    <?php echo $commander->getInfoField('DescriptionEn'); ?>
    <textarea name="DescriptionEn" class="medium limit_500 autogrow"><?php echo $adc->CurrentAd->getDescriptionEn(); ?></textarea>
	
	<hr />
	<h4><?php echo ucfirst($txt->getWord('contact').' '.$txt->getWord('information')); ?></h4>
	<label for="ContactEmail"><?php echo ucfirst($txt->getWord('email')); ?></label>
    <?php echo $commander->getErrorField('ContactEmail'); ?>
    <?php echo $commander->getInfoField('ContactEmail'); ?>
    <input name="ContactEmail" class="medium" type="text" value="<?php echo $adc->CurrentAd->getContactEmail(); ?>" maxlength="100" /><br />
	
	<label for="ContactName"><?php echo ucfirst($txt->getWord('name')); ?></label>
    <?php echo $commander->getErrorField('ContactName'); ?>
    <?php echo $commander->getInfoField('ContactName'); ?>
    <input name="ContactName" class="medium" type="text" value="<?php echo $adc->CurrentAd->getContactName(); ?>" maxlength="100" /><br />
	
	<label for="ContactCompany"><?php echo ucfirst($txt->getWord('company')); ?></label>
    <?php echo $commander->getErrorField('ContactCompany'); ?>
    <?php echo $commander->getInfoField('ContactCompany'); ?>
    <input name="ContactCompany" class="medium" type="text" value="<?php echo $adc->CurrentAd->getContactCompany(); ?>" maxlength="100" /><br />
	
	<label for="ContactMob"><?php echo ucfirst($txt->getWord('mobile')); ?></label>
    <?php echo $commander->getErrorField('ContactMob'); ?>
    <?php echo $commander->getInfoField('ContactMob'); ?>
    <input name="ContactMob" class="medium" type="text" value="<?php echo $adc->CurrentAd->getContactMob(); ?>" maxlength="40" /><br />
	
	<label for="ContactPhone"><?php echo ucfirst($txt->getWord('telephone')); ?></label>
    <?php echo $commander->getErrorField('ContactPhone'); ?>
    <?php echo $commander->getInfoField('ContactPhone'); ?>
    <input name="ContactPhone" class="medium" type="text" value="<?php echo $adc->CurrentAd->getContactPhone(); ?>" maxlength="40" /><br />
	<hr />
	<h4><?php echo ucfirst($txt->getWord('location').' '.$txt->getWord('information')); ?></h4>
	<label for="LocationAddress"><?php echo ucfirst($txt->getWord('address')); ?></label>
    <?php echo $commander->getErrorField('LocationAddress'); ?>
    <?php echo $commander->getInfoField('LocationAddress'); ?>
    <input name="LocationAddress" class="medium" type="text" value="<?php echo $adc->CurrentAd->getLocationAddress(); ?>" maxlength="100" /><br />
	
	<label for="LocationZip"><?php echo ucfirst($txt->getWord('zip')); ?></label>
    <?php echo $commander->getErrorField('LocationZip'); ?>
    <?php echo $commander->getInfoField('LocationZip'); ?>
    <input name="LocationZip" class="medium" type="text" value="<?php echo $adc->CurrentAd->getLocationZip(); ?>" maxlength="100" /><br />
	
	<label for="LocationCity"><?php echo ucfirst($txt->getWord('city')); ?></label>
    <?php echo $commander->getErrorField('LocationCity'); ?>
    <?php echo $commander->getInfoField('LocationCity'); ?>
    <input name="LocationCity" class="medium" type="text" value="<?php echo $adc->CurrentAd->getLocationCity(); ?>" maxlength="100" /><br />
	
	<label for="LocationCountry"><?php echo ucfirst($txt->getWord('country')); ?></label>
    <?php echo $commander->getErrorField('LocationCountry'); ?>
    <?php echo $commander->getInfoField('LocationCountry'); ?>
    <input name="LocationCountry" class="medium" type="text" value="<?php echo $adc->CurrentAd->getLocationCountry(); ?>" maxlength="100" /><br />
	<hr />
	<?php 
	/*
	priceCurrency 	
	priceLocal 	
	priceGlobal 	
	image 	
	*/
	?>
</fieldset>
<?php endif; ?>